@echo off
ECHO Add CRC32  At the end of the document
ECHO -------------------------------------

SET SREC_PATH="C:\Program Files\srecord\bin\srec_cat.exe"

for /f %%i in ('dir /b .\250w_fan.bin') do (
set indexdx=%%~zi
)

ECHO %indexdx%

ECHO %SREC_PATH% 250w_fan.bin -Binary -crop 0 %indexdx%  -crc32-b-e %indexdx%  -o 120w_fan.bin -Binary

%SREC_PATH% 250w_fan.bin -Binary -crop 0 %indexdx%  -crc32-l-e %indexdx%  -o 120w_fan.bin -Binary
